	const db = uniCloud.database()
	module.exports = {
		async like(comment_id, user_id) {
			let res = await db.collection('comment').doc(comment_id).update({
				like_ids: db.command.push([user_id])
			})
			return res.data
		},

		async addReadNum(goods_id) {
			let res = await db.collection('goods_page_view').where({
				goods_id: goods_id
			}).get()

			if (res.data[0] == null) {
				await db.collection('goods_page_view').add({
					goods_id: goods_id,
					read_num: 1
				})
				return {
					goods_id: goods_id,
					read_num: 1
				}
			} else {
				res = await db.collection('goods_page_view').where({
					goods_id: goods_id
				}).update({
					read_num: db.command.inc(1)
				})
			}

			return res.data
		}
	}